home *** CD-ROM | disk | FTP | other *** search
- Path: news.compuserve.com!newsmaster
- From: 100435.736@compuserve.com (David A. Mair)
- Newsgroups: comp.lang.c++
- Subject: Re: Objects and ASM
- Date: Mon, 15 Apr 1996 08:18:53 GMT
- Organization: CompuServe Incorporated
- Message-ID: <4kt0pg$qdt@dub-news-svc-6.compuserve.com>
- References: <4kmof6$csu@sol.sun.csd.unb.ca>
- NNTP-Posting-Host: hd26-162.compuserve.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- e5ir@jupiter.sun.csd.unb.ca (Paul Vermette [NiD/BiM]) wrote:
-
- >I was wondering how you access variables and methods inside of an object
- >if the object was passed as a parameter to an ASM routine. Also I was
- >wondering the same thing with structs..
-
- To do this you will have to know the byte by byte layout of the class
- or structure, they are essentially the same. The layout will be
- implementation (and possibly compiler switch) dependant. If your
- assembler routine has the purpose of only manipulating member
- variables I would try creating a simple class with a few member
- variables then setting them to known but different values, for example
- create some integer style member variables of various sizes and
- initialise them to 1, 2, 3, 4, etc. Then with a debugger step into
- your assembler routine and browse the memory at the address passed.
-
- A far better way would be to get the documentation from your compiler
- vendor, or compile to assembler if your compiler supports it and look
- at the assembly definition of the class. You could paste that into
- your assembler code.
-
- Regards
- David.
-
-